'user strict';
import React, {
    Component
} from 'react';
import {
    hashHistory,
    Link
} from 'react-router'

import '../../scss/common/header.scss'
import {
    Navbar,
    Nav,
    NavItem,
    NavDropdown,
    MenuItem,
} from 'react-bootstrap'

import imgLogo from '../../Img/icon/logo.png'

//网站头部条
export default class header extends Component {
    constructor(props) {
        super(props)
    }
    
    render() {
        const {
            title,
            link,
            back
        } = this.props;
        return (
            <header className="header">
                <Navbar inverse collapseOnSelect>
                    <Navbar.Header>
                      <Navbar.Brand>
                        <a href="#/home"><img src={imgLogo} /> </a>
                      </Navbar.Brand>
                      <Navbar.Toggle />
                    </Navbar.Header>
                    <Navbar.Collapse>
                        <Nav pullRight>
                            <NavDropdown eventKey={3} title={localStorage.phone||'未登录'} id="basic-nav-dropdown">
                              <MenuItem eventKey={3.1}>个人信息</MenuItem>
                              <MenuItem eventKey={3.2}>修改密码</MenuItem>
                              <MenuItem divider />
                              <MenuItem eventKey={3.3} href='#/'>退出登录</MenuItem>
                            </NavDropdown>
                        </Nav>
                      <Nav pullRight>
                        <NavItem eventKey={1} href="#/home/news">新增新闻</NavItem>
                        <NavItem eventKey={1} href="/#/home/about">网站配置</NavItem>
                      </Nav>
                    </Navbar.Collapse>
                  </Navbar>
            </header>
        )
    }
}
